import java.util.List;

public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        binaryTree.preOrder(root);
        System.out.println();
        binaryTree.preOrderNor(root);
        System.out.println();
        System.out.println("============");
        binaryTree.inOrder(root);;
        System.out.println();
        binaryTree.inOrderNor(root);
        System.out.println();
        System.out.println("============");
        binaryTree.postOrder(root);;
        System.out.println();
        binaryTree.postOrderNor(root);


//        System.out.println(binaryTree.isCompleteTree(root));
        /*binaryTree.preOrder(root); //前序遍历
        System.out.println();
        binaryTree.inOrder(root); //中序遍历
        System.out.println();
        binaryTree.postOrder(root); //后序遍历
        System.out.println();*/
        //System.out.println("===============");
//        List<BinaryTree.TreeNode> ret = binaryTree.preOrder1(root); //前序遍历2.0
//        for (BinaryTree.TreeNode x : ret) {
//            System.out.print(x.val + " ");
//        }
//        List<BinaryTree.TreeNode> ret1 = binaryTree.inOrder1(root); //中序遍历2.0
//        for (BinaryTree.TreeNode x : ret1) {
//            System.out.print(x.val + " ");
//        }
        /*List<BinaryTree.TreeNode> ret2 = binaryTree.postOrder1(root); //后序遍历2.0
        for (BinaryTree.TreeNode x : ret2) {
            System.out.print(x.val + " ");
        }
        System.out.println();
        System.out.println("===============");
        System.out.println(binaryTree.nodeSize(root));
        System.out.println(binaryTree.nodeSize1(root));
        System.out.println(binaryTree.getLeafSize(root));
        System.out.println(binaryTree.getLeafSize1(root));
        System.out.println("===============");
        System.out.println(binaryTree.getKLevelNodeSize(root, 3));
        System.out.println("===============");
        System.out.println("树的高度：" + binaryTree.getHigh(root));
        System.out.println(binaryTree.find(root, 'A'));*/
        /*System.out.println("===============");
        binaryTree.levelOrder(root);
        System.out.println();*/
    }
}
